package org.accp.lipei.web;

import entity.*;
import org.accp.lipei.dto.PageBean;
import org.accp.lipei.service.settlement_infoservice;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin(methods= {RequestMethod.POST,RequestMethod.GET})
@RestController
public class Settlement_infoweb {
    @Resource
    private settlement_infoservice settlement_infoservice;
    @RequestMapping("/lipeiselect")//理赔查询的方法
    public PageBean lipeiselect(PageBean pb) {
        return settlement_infoservice.lipeiselect(pb);
    }
    @RequestMapping("/lipeiinsert")//理赔新增的方法
    public void lipeiinsert(settlement_info settlement_info){
        System.out.println(settlement_info);
        settlement_infoservice.lipeiinsert(settlement_info);
    }
    @RequestMapping("/selectbeibaoren")
    public recognizee_info bao1(String baoan){
        return settlement_infoservice.bao1(baoan);
    }
    @RequestMapping("/selectchesun")
    public List<car_damage_info> chesun(String baoanid){//车损
        return settlement_infoservice.chesun(baoanid);
    }
    @RequestMapping("/selectwusun")
    public List<object_damage_info> wusun(String baoanid){//物损
        return settlement_infoservice.wusun(baoanid);
    }
    @RequestMapping("/selectrenshang")
    public List<human_injury_info> renshang(String baoanid){//人伤
        return settlement_infoservice.renshang(baoanid);
    }
    @RequestMapping("/updatelipei")
    public void updatelipei(String lipeiid){
        settlement_infoservice.updatelipei(lipeiid);
    }
    @RequestMapping("/updatebaoan")
    public void updatebaoan(String baoanid){
        settlement_infoservice.updatebaoan(baoanid);
    }
}
